import request from "@/utils/request";
enum API{
    ARTICLES="/mp/articles",//获取文章列表
}

export interface getSearchArticlesType{
    status: string|undefined,
     channel_id: number|string|undefined,
      begin_pubdate: string|undefined,
       end_pubdate:  string|undefined
}

export  const getArticles =(data:string)=>{
    return request.get(API.ARTICLES,{params:data});
 }

 export  const delArticles =(id:string)=>{
   return request.delete(API.ARTICLES+`/${id}`);
  }

  export const getSearchArticles = (data:getSearchArticlesType)=>{
      return request.get(API.ARTICLES,{params:data})
  }